package com.cqut.dao;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

import com.cqut.model.CompetitionManager;
import com.cqut.pojo.vo.comPriorityVO;

public interface CompetitionManagerMapperExtra {
	List<comPriorityVO> findComPriority(
			@Param("competitionName")
			String competitionName,
			@Param("operatorId")
			String operatorId, 
			@Param("start")
			int start,
			@Param("end")
			int end);

	String findComPriorityNo(
			@Param("competitionName")
			String competitionName, 
			@Param("operatorId")
			String operatorId, 
			@Param("start")
			int start,
			@Param("end")
			int end);

	List<Map<String, Object>> getComParamListByName(
			@Param("competitionName")
			String competitionName,
			@Param("start")
			int start,
			@Param("end")
			int end);
	
	long getComParamListCountByName(
			@Param("competitionName")
			String competitionName);
	
	List<Map<String, Object>> getComParamPassListByName(
			@Param("competitionName")
			String competitionName,
			@Param("start")
			int start,
			@Param("end")
			int end);
	
	long getComParamPassListCountByName(
			@Param("competitionName")
			String competitionName);

	Map<String, Object> getComDetailBycompetitionId1(
			@Param("competitionId")
			String competitionId);

	Map<String, Object> getComDetailBycompetitionId2(
			@Param("competitionId")
			String competitionId);
	
	Map<String, Object> getComDetailBycompetitionId(
			@Param("competitionId")
			String competitionId);

	String findIdByPriority(
			@Param("priority")
			Integer priority);

	int shiftByPriority(
			@Param("priority")
			Integer priority, 
			@Param("competitionId")
			String competitionId);
	
	int updateStateToProgress(
			@Param("competitionId")
			String competitionId,
			@Param("state")
			String state);
	
	int updateStateToStorage(
			@Param("competitionId")
			String competitionId,
			@Param("state")
			String state);

	String findComFollowNum(
			@Param("competitionId")
			String competitionId);

	void insertHost(
			@Param("assistUnitName")
			String assistUnitName,
			@Param("competitionId")
			String competitionId,
			@Param("hostUnitContact")
			String hostUnitContact,
			@Param("hostUnitContactMail")
			String hostUnitContactMail,
			@Param("hostUnitContactPerson")
			String hostUnitContactPerson,
			@Param("hostUnitName")
			String hostUnitName, 
			@Param("hostUnitId")
			String hostUnitId);
}
